<div class="visible-lg-block">
    <div class="sidebar left-sidebar">
  <div class="sidebar-top hidden-xs">
    <h1 class="site-title"><a href="<?php echo esc_url( home_url( '/' ) ); ?>" rel="home"><?php bloginfo( 'name' ); ?></a></h1>
  </div>
  <div class="sidebar-content">
  <div class="collapse navbar-collapse">
      <?php
        wp_nav_menu(
          array(
            'theme_location' => 'left',
            'menu_id'        => 'left-menu',
            'container' => 'nav',
            'menu_class' => 'nav nav-pills nav-stacked',
            'depth' => 1,
          )
        );
      ?>
    </div>
  </div>
    <div class="sidebar-footer">
      <p id="hitokoto">骚等，我有话说</p>
    </div>
</div>
</div>

<div class="hidden-lg">
    <div class="sidebar left-sidebar">
      <div class="sidebar-content nav-nopc">
        <div class="navbar-header">
          <button type="button" class="navbar-toggle" data-toggle="collapse"
                  data-target="#example-navbar-collapse">
              <span class="glyphicon glyphicon-plus" aria-hidden="true"></span>
          </button>
          <a class="navbar-brand visible-xs" href="<?php echo esc_url( home_url( '/' ) ); ?>" title="<?php bloginfo( 'name' ); ?>"><?php bloginfo( 'name' ); ?></a>
      </div>
      <div class="collapse navbar-collapse" id="example-navbar-collapse">
          <?php
            wp_nav_menu(
              array(
                'theme_location' => 'left',
                'menu_id'        => 'left-menu',
                'container' => 'nav',
                'menu_class' => 'nav nav-pills nav-stacked',
                'depth' => 1,
              )
            );
          ?>
        </div>
      </div>
      <div class="sidebar-footer">
      <p id="hitokoto2">骚等，我有话说</p>
          <!-- 以下写法，选取一种即可 -->
    <!-- 现代写法，推荐 -->
    <!-- 兼容低版本浏览器 (包括 IE)，可移除 -->
    <script src="https://cdn.jsdelivr.net/npm/bluebird@3/js/browser/bluebird.min.js"></script>
    <script src="https://cdn.jsdelivr.net/npm/whatwg-fetch@2.0.3/fetch.min.js"></script>
    <!--End-->
    <script>
      fetch('https://v1.hitokoto.cn?c=d')
        .then(function (res){
          return res.json();
        })
        .then(function (data) {
          var hitokoto = document.getElementById('hitokoto');
          var hitokoto2 = document.getElementById('hitokoto2');
          hitokoto.innerText = data.hitokoto; 
          hitokoto2.innerText = data.hitokoto; 
        })
        .catch(function (err) {
          console.error(err);
        })
    </script>
    </div>
    </div>
</div>